package org.example.repositories;

import org.example.model.UrlRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * @Author: LiFuqiang
 * @Date: 2020/10/12 13:18
 * @Version 1.0
 * @description
 */
@Repository
public interface TestRepository extends JpaRepository<UrlRole,Integer> {

    @Query(value = "select t from UrlRole t where t.id= :id")
    List<UrlRole> findById(@Param(value = "id") int id);
}
